import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 配置element-plus的国际化
import zhCn from 'element-plus/es/locale/lang/zh-cn'
//svg插件需要配置代码
import 'virtual:svg-icons-register'
//引入路由
import router from './router'
//引入仓库
import pinia from "@/stores";
//引入全局组件插件
import globalComponent from '@/components'
//引入路由鉴权
import './permisstion'

// 创建应用实例对象
const app = createApp(App)
app.use(createPinia())
//安装element-plus插件
app.use(ElementPlus, {
    locale: zhCn,
})
//安装路由
app.use(router)
//安装仓库
app.use(pinia)
//安装全局组件插件
app.use(globalComponent)
// 挂载应用实例对象到挂载点
app.mount('#app')
